convert hashmap to treemap in java